]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extensionPrefs: Trick xgettext into accepting odd number of backticks
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 29 Oct 2019 13:01:07 +0000 (14:01 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Tue, 29 Oct 2019 17:38:06 +0000 (17:38 +0000)
Xgettext learned about template strings now, which is good. However
it's still buggy, so instead of the "classic" xgettext issue with
backticks, we now have exciting new issues to find work-arounds for.

One issue is that it doesn't detect backticks inside string constants
as regular characters, so having an odd number of backticks throws off
its regex.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/792

js/extensionPrefs/main.js

index 9c5e3ecc00f93ccaa69adce299172bde6c4fb0e7..86afa34eee73e4ff761ef58cb3562eddcb859539 100644 (file)
@@ -159,14 +159,14 @@ var Application = GObject.registerClass({
             // markdown for pasting in gitlab issues
             let lines = [
                 `The settings of extension ${row.uuid} had an error:`,
-                '```',
+                '```', // '`' (xgettext throws up on odd number of backticks)
                 `${exc}`,
-                '```',
+                '```', // '`'
                 '',
                 'Stack trace:',
-                '```',
+                '```', // '`'
                 exc.stack.replace(/\n$/, ''), // stack without trailing newline
-                '```',
+                '```', // '`'
                 ''
             ];
             clipboard.set_text(lines.join('\n'), -1);